#! /bin/bash
gnome-terminal --window -e 'bash -c "roscore;exec bash"'

# 打开摄像头
sleep 7s
gnome-terminal --window -e 'bash -c "cd config/cam_test_ws;source ./devel/setup.bash;roslaunch usb_cam usb_cam.launch;exec bash"'

# 打开base_control
sleep 5s
gnome-terminal --window -e 'bash -c "cd config/teleop;source ./devel/setup.bash;echo "nano"|sudo -S chmod 777 /dev/ttyACM0;rosrun base_controller base_controller;exec bash"'

# # 给雷达执行权限+参数服务器初始化
sleep 5s
gnome-terminal --window -e 'bash -c "cd config/leishen_ws;echo "nano"|sudo -S chmod 777 /dev/ttyUSB0;source ./devel/setup.bash;roslaunch ls01b_v2 ls01b_v2.launch;exec bash"'

sleep 5s
gnome-terminal --window -e 'bash -c "cd config/teleop;source ./devel/setup.bash;cd src/smartcar/scripts;rosrun laser_test laser_test;exec bash"'


# 打开angle_correct主节点
sleep 5s
gnome-terminal --window -e 'bash -c "cd config/teleop;source ./devel/setup.bash;cd src/smartcar/scripts;python angle_correct.py $VAR1 $VAR2 $VAR3 $VAR4 $VAR5 $VAR6 $VAR7 $VAR8 $VAR9 $VAR10 $VAR11 $VAR12 $VAR13 $VAR14 $VAR15 $VAR16 $VAR17 $VAR18 $VAR19 $VAR20;exec bash"'

